#include<iostream>
#include<queue>
#include<stack>
//#include<priority_queue>

using namespace std;
void test()
{

 stack<int> s;
 s.push(1);
 s.push(2);
 s.push(3);
  
 cout<<s.size()<<endl;
 while(!s.empty())
 {
   cout<<s.top()<<"  ";
   s.pop();
 }

 cout<<endl;

 queue<int> q;
 q.push(7);
 q.push(8);
 q.push(9);

 while(!q.empty())
 {
  
   cout<<q.front()<<" "; 
   q.pop();
 }
 cout<<endl;

 priority_queue<int> pq;
  pq.push(3);
	pq.push(6);
	pq.push(0);
	pq.push(2);
	pq.push(9);
	pq.push(8);
	pq.push(1);

  while(!pq.empty())
  {
    cout<<pq.top()<<"  ";
    pq.pop();
  }
  cout<<endl;

}


int main()
{
  test();

  return 0;
}
